var mongoose = require('../../../utils/dbUtils');
//创建学生的schema
let studentShcma =new mongoose.Schema({
    name:String,
    age:Number,
    gender:String,
    //classid使用对象进行填充
    classid:{
        //classid 的类型
        type:mongoose.Schema.Types.ObjectId,
        //引用的数据模型（class的模型）
        ref:"classModel"
    }
}) ;
//创建学生的model
let studentModel = mongoose.model("studentModel",studentShcma,"students");

module.exports = studentModel;